package com.zhongkai.model3;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "user_xy",  catalog = "")
public class UserXy {
    private Integer id;
    private String stringTxt;

    @Id
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "string_txt")
    public String getStringTxt() {
        return stringTxt;
    }

    public void setStringTxt(String stringTxt) {
        this.stringTxt = stringTxt;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserXy userXy = (UserXy) o;
        return Objects.equals(id, userXy.id) &&
                Objects.equals(stringTxt, userXy.stringTxt);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, stringTxt);
    }
}
